<html xmlns="http://www.w3.org/1999/xhtml"><head><style type="text/css">
dt {
  font-style: italic;
  margin-top: 15px;
  margin-bottom: 3px;
  margin-left: 0px;
  border-bottom: 1px dotted black;
}
dd {
  margin-left: 10px;
}
table {
  border-collapse:collapse;
  border: 1px solid black;
  margin-top: 7px;
}
th {
  border: 1px solid black;
  padding: 3 7 3 7;
}
td {
  border: 1px solid black;
  padding: 3 7 3 7;
}
</style></head><body><p><a name="areturn"></a><b>areturn</b> :
  return from method with object reference result : <a href="opcodes.html">index</a> : <a href="http://asm.objectweb.org/asm40/javadoc/user/org/objectweb/asm/MethodVisitor.html#visitInsn(int)">visitInsn()</a></p><dl><dt>Description</dt><dd>objectref is a reference to an object. It must be <i xmlns="">assignment
compatible</i> with the return type of the current method (See Chapter 7 for
details of assignment compatibility). areturn pops objectref off the
stack and pushes it onto the operand stack of the invoker (i.e. the method
which used invokevirtual, invokespecial,
invokestatic or invokeinterface to call the currently
executing method). All other items on the current method's operand stack are
discarded. If the current method is marked as synchronized, then an implicit
monitorexit instruction is executed. Then the current method's frame is
discarded, the invoker's frame is reinstated, and control returns to the
invoker.</dd><dt>Example</dt><dd><pre>
.class Example
.super java/lang/Object
; This method takes an integer parameter n, and returns a new array of ints of length n.
.method public static makeIntArray(I)[I
    aload_0        ; push the array size (i.e. n) parameter onto the stack
    newarray int   ; make the array
    areturn        ; return the array
.endmethod
    ; an example of calling makeIntArray to make a 10 element array of ints:
    bipush 10
    invokestatic Example/makeIntArray(I)[I
    astore_1 ; store array in local variable 1
</pre></dd><dt>See also</dt><dd><a href="ref-lreturn.html">lreturn</a> <a href="ref-.html"></a> <a href="ref-freturn.html">freturn</a> <a href="ref-.html"></a> <a href="ref-dreturn.html">dreturn</a> <a href="ref-.html"></a> <a href="ref-ireturn.html">ireturn</a> <a href="ref-.html"></a> <a href="ref-return.html">return</a> <a href="ref-.html"></a> <a href="ref-invokevirtual.html">invokevirtual</a> <a href="ref-.html"></a> <a href="ref-invokespecial.html">invokespecial</a> <a href="ref-.html"></a> <a href="ref-invokestatic.html">invokestatic</a> <a href="ref-.html"></a> <a href="ref-invokeinterface.html">invokeinterface</a> </dd><dt>Stack</dt><dd><table xmlns="">
<tr>
<td>
<b>Before </b>
</td>
<td><b>After</b></td></tr>
<tr>
<td>objectref</td>
<td>n/a</td></tr>
<tr>
<td>...</td>
<td>...</td></tr>
</table></dd><dt>Bytecode</dt><dd><table xmlns="">
<tr>
<td>
<b> Type </b>
</td>
<td><b>Description</b></td></tr>
<tr>
<td>
u1 
</td>
<td>areturn
opcode = 0xB0 (176)
</td></tr>
</table></dd></dl></body></html>